<template>
  <div>
    <vxe-table
      border
      height="300"
      :loading="loading"
      :data="tableData">
      <vxe-column type="seq" width="60"></vxe-column>
      <vxe-column field="name" title="Name" width="300"></vxe-column>
      <vxe-column field="sex" title="Sex" width="300"></vxe-column>
      <vxe-column field="age" title="Age" width="300"></vxe-column>
      <vxe-column field="date12" title="Date" width="300"></vxe-column>
      <vxe-column field="address" title="Address" width="300" show-overflow></vxe-column>
      <template #empty>
        <span style="color: red;">
          <img src="https://pic2.zhimg.com/50/v2-f7031359103859e1ed38559715ef5f3f_hd.gif">
          <p>不用再看了，没有更多数据了！</p>
        </span>
      </template>
    </vxe-table>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'

interface RowVO {
  name: string
  role: string
  sex: string
  age: number
  date12: string
  address: string
}

const loading = ref(false)
const tableData = ref<RowVO[]>([])

loading.value = true
setTimeout(() => {
  tableData.value = []
  loading.value = false
}, 1000)
</script>
